package com.bawei.module_home.adapter;

import com.bawei.library_base.utils.GlideUtil;
import com.bawei.module_home.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author : zhiyu
 * @date : 2021/12/10
 * @content :
 */
public class DiscountAdapter extends BaseQuickAdapter<String, BaseViewHolder> {


    public DiscountAdapter(@Nullable List<String> data) {
        super(R.layout.layout_home_discount_item, data);

    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, String s) {

        GlideUtil.getInstance().LoadImage(getContext(),s,holder.getView(R.id.mGoodsIconIv));

        //静态假数据
        holder.setText(R.id.mDiscountAfterTv,"￥2634.00");
        holder.setText(R.id.mDiscountBeforeTv,"$1000.00");
//        holder.itemView.mDiscountAfterTv.text = "￥2634.00"
//        holder.itemView.mDiscountBeforeTv.text = "$1000.00"
    }
}
